package cn.mynb.service;

import java.io.Serializable;
import java.util.List;

import cn.mynb.util.PageModel;

public interface ServiceBase<T> {

	/**
	 * 保存对象
	 * @param t
	 * @return true of false 
	 */
	public int saveUserService(T t);
	
	public Serializable saveUserSerializableService(T t);
	
	/**
	 * 删除单个对象
	 * @param t
	 * @return 成功返回 1， 失败返回 0
	 */
	public int deleteUserService(T t); 
	
	public int updateUserService(T t);
	
	public T queryByIdUserService(int id);
	
	/**
	 * 根据某个字段查询单个对象
	 * @param param
	 * @return Object
	 */
	@SuppressWarnings("unchecked")
	public T querySingleUserService(String[] param);
	
	@SuppressWarnings("unchecked")
	public List queryAllUserService();
	
	@SuppressWarnings("unchecked")
	public PageModel queryByParamUserService(String hql,String countHQL,List param,int offset,int pageSize);	
}
